/**
 * 
 */

module.exports = function(mod, name) {

	mod.controller(name, ['$scope', 'topListService', '$http', '$timeout', '$routeParams', function($scope, topListService, $http, $timeout, $routeParams) {
		$scope.seedTopListService = topListService;

		//seedList页面数据获取
		$scope.seedTopListService.angularCallAjax('get', '/api/seeds/entry', {
			pageno: 1
		}, function(data, status) {
			if (data.status === true) {
				$scope.seedListNums = data.data;
			}
		});
		$scope.routeParamsId = $routeParams.id
			//		//seed详细查询
			//		//console.log($routeParams);
		$scope.seedTopListService.angularCallAjax('get', '/api/seeds/qbyid', {
			id: $routeParams.id
		}, function(data, status) {
			console.log("data");
			if (data.status === true) {
				$scope.seedListArrays = data.data[0];
				console.log($scope.seedListArrays);
			}
		});

		$scope.title = "种子编辑";
		$scope.editTitle = "种子编辑";

	}]);
}